package com.hexinfo.dmpro.component.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @Package: com.example.demo.HIVE操作
 * @ClassName HiveErrorFieldNamesEnum
 * @Description: Hive表结构错误的列头
 * @Author: wz.li
 * @Date 2023/10/19 13:19
 * @Version v2.0.2
 **/
@Getter
@AllArgsConstructor
public enum HiveErrorFieldNamesEnum {
    /** Hive表结构错误的列头 */
    T1("T1", "", "非法字段1", 1),
    T2("T2", null, "非法字段2", 2),
    T3("T3", "# Partition Information", "非法字段3", 3),
    T4("T4", "# col_name            ", "非法字段4", 4),
    T5("T5", "# col_name", "非法字段5", 5);

    private final String key;
    private final String value;
    private final String description;
    private final Integer sort;

    public static List<String> getValues() {
        List<String> values = new ArrayList<>();
        for (HiveErrorFieldNamesEnum hiveErrorFieldNamesEnum : HiveErrorFieldNamesEnum.values()) {
            values.add(hiveErrorFieldNamesEnum.getValue());
        }
        return values;
    }
}
